<div id="venue_count<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>">
    <div class="createBox addmarginB20">
        <div class="batchNum">
            <p class="remmarginB fnt-size18 font-opensansbd">Batch <span class="createdVenueBatchCount create_venue_<?php echo $venueIndex; ?>_batchcounter" id="create_venue_<?php echo $venueIndex; ?>_batch_counter_<?php echo $batchIndex; ?>"><?php echo $batchIndex + 1; ?></span><em class="sprite dw-arrow"></em></p>
        </div>
        <div class="content">
            <div class="padding20px rempaddingT">   
                <div class="height1px dash-borB remmarginB addmarginB20"></div>                    	
                <div class="formElements">
                    <div class="col-2">
                        <div class="common">
                            <div class="colcoursebatch col1">
                                <div class="dob flatui">
                                    <label for="CourseBatche_date_from" class="required">Start Date 
                                        <span class="required">*</span></label>
                                        <?php if ($batchIndex == 0) { ?><em class="sprite question-sign" title="<?php echo Message::CLASS_BATCH_START_DATE; ?>">&nbsp;</em> <?php } ?>
                                    <div class="clear"></div>
                                    <input type="hidden" name="batchIndex[<?php echo $venueIndex; ?>][]" value="<?php echo $batchIndex; ?>">
                                    <input id="course_venue_<?php echo $venueIndex; ?>_batch_start_date_<?php echo $batchIndex; ?>" name="CourseBatche[ClassVenue][<?php echo $venueIndex; ?>][date_from][]" type="text" class="requiredfield hasDatepicker field small" onkeyup="hasDatepicker(this.id);" onchange="checkDate(this.id)" onblur="checkValueEmpty(this.id)" onclick="hasDatepicker(this.id);" onpaste="return false;" value="<?php echo $venueWithBatch[$batchIndex]->date_from; ?>">
                                    <div class="errorMessage" id="error_course_venue_<?php echo $venueIndex; ?>_batch_start_date_<?php echo $batchIndex; ?>" style="display:none">Start date cannot be blank.</div></div>
                            </div>
                            <div class="colcoursebatch col2">
                                <div class="timef"><label for="CourseBatche_date_to" class="required">End Date <span class="required">*</span></label>
                                    <?php if ($batchIndex == 0) { ?><em class="sprite question-sign" title="<?php echo Message::CLASS_BATCH_END_DATE; ?>">&nbsp;</em> <?php } ?><div class="clear"></div>
                                    <input name="CourseBatche[ClassVenue][<?php echo $venueIndex; ?>][date_to][]" id="course_venue_<?php echo $venueIndex; ?>_batch_end_date_<?php echo $batchIndex; ?>" type="text" class="hasDatepicker requiredfield field  small" onkeyup="hasDatepicker(this.id)" onchange="checkDate(this.id)" onclick="hasDatepicker(this.id)" onpaste="return false;" onblur="checkValueEmpty(this.id)" value="<?php echo $venueWithBatch[$batchIndex]->date_to; ?>">
                                    <div class="errorMessage" id="error_course_venue_<?php echo $venueIndex; ?>_batch_end_date_<?php echo $batchIndex; ?>" style="display:none">End date cannot be blank.</div>
                                    <div class="errorMessage" id="enddate_course_venue_<?php echo $venueIndex; ?>_batch_end_date_<?php echo $batchIndex; ?>"></div>                                
                                </div>                            
                            </div>
                            <div class="colcoursebatch col2">
                                <div class="timef flatui">
                                    <label for="CourseBatche_price" class="required">Price <span class="required">*</span></label>
                                    <?php if ($batchIndex == 0) { ?><em class="sprite question-sign" title="<?php echo Message::CLASS_BATCH_PRICE; ?>">&nbsp;</em> <?php } ?><div class="clear"></div>
                                    <input name="CourseBatche[ClassVenue][<?php echo $venueIndex; ?>][price][]" id="course_venue_<?php echo $venueIndex; ?>_batch_price_<?php echo $batchIndex; ?>" type="text" onkeypress="return isNumberKey(event)" class="requiredfield field  small" onblur="checkValueEmpty(this.id)" value="<?php echo $venueWithBatch[$batchIndex]->price; ?>">
                                    <div class="errorMessage" id="error_course_venue_<?php echo $venueIndex; ?>_batch_price_<?php echo $batchIndex; ?>" style="display:none">Price cannot be blank.</div>
                                </div>
                            </div>
                            <div class="colcoursebatch col2">
                                <div class="timef flatui"><label for="CourseBatche_seats" class="required">Seats <span class="required">*</span></label>
                                    <?php if ($batchIndex == 0) { ?><em class="sprite question-sign" title="<?php echo Message::CLASS_BATCH_SEATS; ?>">&nbsp;</em> <?php } ?><div class="clear"></div>
                                    <input name="CourseBatche[ClassVenue][<?php echo $venueIndex; ?>][seats][]" id="course_venue_<?php echo $venueIndex; ?>_batch_seats_<?php echo $batchIndex; ?>" type="text" onkeypress="return isNumberKey(event)" class="requiredfield field  small" onblur="checkValueEmpty(this.id)" value="<?php echo $venueWithBatch[$batchIndex]->seats; ?>">
                                    <div class="errorMessage" id="error_course_venue_<?php echo $venueIndex; ?>_batch_seats_<?php echo $batchIndex; ?>" style="display:none">Seats cannot be blank.</div>
                                </div>
                            </div>
                            <div class="clear"></div>
                        </div>
                        <div class="greenBor">
                            <p class="padding20px remmarginB font-opensansbd fnt-size16">Batch Discounts</p>
                            <div class="dash-borB height1px"></div>
                            <div class="padding20px">
                                <?php /* .......................          Here is the early discount code start................ */ ?>
                                <?php                             
                                $this->renderPartial('/courseBatche/_courseEarlyDiscount', array('form' => $form, 'batchIndex' => $batchIndex,
                                    'venueIndex' => $venueIndex,
                                    'batchId' => $venueWithBatch[$batchIndex]->id));
                                ?> 


                                <?php /* .......................          Here is the early discount code end................ */ ?>

                                <?php /* .......................          Here is the group discount code start................ */ ?>

                                <?php
                                $this->renderPartial('/courseBatche/_courseGroupDiscount', array('form' => $form, 'batchIndex' => $batchIndex,
                                    'venueIndex' => $venueIndex,
                                    'batchId' => $venueWithBatch[$batchIndex]->id));
                                ?> 


                                <?php /* .......................          Here is the group discount code end ................ */ ?>
                                <div class="height1px borB addmarginB30 rempaddingB"></div>
                            </div>
                        </div>   
                        <div class="clear"></div>
                        <?php $daySesion = CourseBatcheDaySession::model()->findAllByAttributes(array('course_batche_id' => $venueWithBatch[$batchIndex]->id)); ?>
                        <?php
                        $dateSesion = '';
                        $dateSesion = CourseBatcheDateSession::model()->findAllByAttributes(array('course_batche_id' => $venueWithBatch[$batchIndex]->id));
                        $totaldateSesion = 0;
                        $totaldateSesion = count($dateSesion);
                        ?>
                        <div class="common">                            
                            <div class="padding20px">
                                <input <?php if (!empty($daySesion)) { ?> checked="checked" <?php } ?>  type="radio" class="fancyRadio"  id="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_show_hide" name="days_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_dateSession"><label>Days of the week<?php if ($batchIndex == 0) { ?><em class="sprite question-sign" title="<?php echo Message::CLASS_BATCH_DAY_SESSION; ?>">&nbsp;</em> <?php } ?></label>
                                <input <?php if (!empty($dateSesion)) { ?> checked="checked" <?php } ?> type='radio' class="fancyRadio"  id="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_dateSession" name="date_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_dateSession"><label>Number of Sessions<?php if ($batchIndex == 0) { ?><em class="sprite question-sign" title="<?php echo Message::CLASS_BATCH_DATE_SESSION; ?>">&nbsp;</em> <?php } ?></label>
                            </div>
                        </div>
                        <div class="common">
                            <div class="greenBor">
                                <p class="padding20px remmarginB font-opensansbd fnt-size16">Batch Sessions</p>
                                <div class="dash-borB height1px"></div> 
                                <?php
                                $totalSesion = 0;
                                if (!empty($daySesion)) {
                                    $this->renderPartial('/courseBatche/courseBatcheDaysession', array('form' => $form, 'batchIndex' => $batchIndex,
                                        'venueIndex' => $venueIndex,
                                        'batchId' => $venueWithBatch[$batchIndex]->id,
                                        'daySesion' => $daySesion));
                                    $totalSesion = count($daySesion);
                                }
                                ?>
                                <div class="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_show_hide"  <?php
                                if (!empty($daySesion) || !empty($dateSesion)) {
                                    echo 'style="display:none"';
                                }
                                ?> >

                                </div>                               
                                <div class="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession"></div> 
                                <div class="padding20px">
                                    <div class="formElements venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_dateNoSession" <?php
                                     if (!empty($daySesion) && empty($dateSesion)) {
                                         echo 'style="display:none"';
                                     }
                                ?>>
                                        <div class="col col-1">
                                            <label>No. of Sessions<em class="sprite question-sign">&nbsp;</em></label>
                                            <input type="text" class="field" name="CourseBatche[ClassVenue][<?php echo $venueIndex; ?>][no_of_session][]" id="no_of_session_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>" onchange="dateSessionValue(this.id);" onkeyup=" dateSessionValue(this.id);" onkeypress="return isNumberKey(event);" placeholder="0" value="<?php echo $totaldateSesion; ?>" maxlength="2">
                                        </div>
                                        <div class="clear"></div>
                                    </div>
                                </div>
                                <div class="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_dateSession" > 
                                    <?php
                                    if (!empty($dateSesion)) {
                                        $this->renderPartial('/courseBatche/courseBatchedateSession', array('form' => $form, 'batchIndex' => $batchIndex,
                                            'venueIndex' => $venueIndex,
                                            'batchId' => $venueWithBatch[$batchIndex]->id,
                                            'dateSesion' => $dateSesion));
                                    }
                                    ?> </div>

                                <div class="dash-borB height1px"></div>                               
                                <div class="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_addSesion" <?php
                                    if (!empty($dateSesion)) {
                                        echo'style="display:none;"';
                                    }
                                    ?>>
                                    <div class="padding20px">
                                        <a class="floatR" href="javascript:void(0);" onclick="addDaySession(this.id);" id="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_<?php echo $totalSesion; ?>">+Add More</a>
                                        <div class="clear"></div>
                                    </div>
                                </div>

                            </div>


                            <?php /* .......................         Here is the class structure code start................ */ ?>
                            <div class="greenBor" style="margin-top: 10px;">
                                <p class="padding20px remmarginB font-opensansbd fnt-size16">Class Structure</p>
                                <div class="dash-borB height1px addmarginB20"></div>
                                <?php
                                $class = 'course';
                                $this->renderPartial('/classStructures/updateClassStructure', array('form' => $form, 'batchIndex' => $batchIndex,
                                    'venueIndex' => $venueIndex,
                                    'type' => $class,
                                    'classId' => $venueWithBatch[$batchIndex]->courses_id,
                                    'batchId' => $venueWithBatch[$batchIndex]->id));
                                ?> 
                            </div>
                            <?php /* .......................         Here is the class structure code end................ */ ?>
                        </div>
                    </div>
                    <?php if ($batchIndex != 0) { ?>
                        <p class="alignL padding20px remmarginB">
                            <a href="javascript:void(0)" id="venue_remove_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>" onclick="reMoveBatch(this.id);">-Remove Batch</a>
                        </p><?php } ?>
                </div>
            </div>                                
        </div>  
    </div>  </div>

